package com.ayf.payment.game.api.entity.platform;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商户提现
 */
@Table(name = "t_merchant_cash_out")
@Data
public class MerchantCashOut {
    private static final long serialVersionUID = 1L;


    @Id
    @Column(name = "id")
    private Integer id;

    /**
     * 商户ID
     */
    @Column(name = "merchant_id")
    private Integer merchantId;

    /**
     * 批次
     */
    @Column(name = "batc_number")
    private String batcNumber;

    @Column(name = "batc_time")
    private Date batchTime;

    /**
     * 结算流水号
     */
    @Column(name = "trade_number")
    private String tradeNumber;

    /**
     * 结算金额
     */
    @Column(name = "amount")
    private BigDecimal amount;

    /**
     * 结算类型；0银行卡 1支付宝
     */
    @Column(name = "settle_type")
    private Integer settleType;

    /**
     * 实付结算金额
     */
    @Column(name = "actual_amount")
    private BigDecimal actualAmount;

    /**
     * 手续费
     */
    @Column(name = "fee")
    private BigDecimal fee;

    /**
     * 发起人
     */
    @Column(name = "launch_name")
    private String launchName;

    /**
     * 操作人
     */
    @Column(name = "operator_name")
    private String operatorName;

    /**
     * 操作时间
     */
    @Column(name = "operator_time")
    private Date operatorTime;

    /**
     * 交易状态 0等待审核 1 拒绝结算 
2 同意结算 3 付款  4 付款失败 5 代付中 7 提现拒绝结算
     */
    @Column(name = "trade_status")
    private Short tradeStatus;

    /**
     * 创建时/发起时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 年月日（20190101）结算日期
     */
    @Column(name = "settle_date")
    private Integer settleDate;

    /**
     * 银行名称
     */
    @Column(name = "bank_name")
    private String bankName;

    /**
     * 银行卡号
     */
    @Column(name = "card_no")
    private String cardNo;

    /**
     * 收款人
     */
    @Column(name = "account_name")
    private String accountName;

    /**
     * 开户城市
     */
    @Column(name = "bank_city")
    private String bankCity;

    /**
     * 开户省份
     */
    @Column(name = "bank_province")
    private String bankProvince;
    /**
     * 支行名称
     */
    @Column(name = "bank_branch_name")
    private String bankBranchName;

    /**
     * 开户行联行行号
     */
    @Column(name = "bank_branch_no")
    private String bankBranchNo;

    /**
     * 通道编码
     */
    @Column(name = "pay_channel_code")
    private String payChannelCode;

    @Column(name = "pay_channel_id")
    private Integer payChannelId;

    /**
     * 支付返回码
     */
    @Column(name = "return_msg")
    private String returnMsg;


    /**
     * 提现类型：1提现到可用余额；2提现到银行卡；3线下付款
     */
    @Column(name = "cash_out_type")
    private Integer cashOutType;

    /**
     * 0 平台提现   1 商户自己提现 2-实时结算
     */
    @Column(name = "is_atuo_settle")
    private Integer isAtuoSettle;

    /**
     * 结算单号
     */
    @Column(name = "settle_order_on")
    private String settleOrderOn;

    /**
     * 代付完成时间
     */
    @Column(name = "finish_time")
    private Date finishTime;

    /**
     * 渠道订单号
     */
    @Column(name = "channel_order_no")
    private String channelOrderNo;
}